<template>
    <div>
        {{index}}
    </div>

    <div @click="index++">+++++++++++++</div>

    <router-link to="/about">about</router-link>
</template>

<script>
export default {
    name: 'home',
    data () {
        return {
            index: 0
        }
    },
    created(){
        this.$store.commit("addPage", "home")
    },
    watch: {
        index(v) {
            console.log(v)
        }
    },
    mounted () {
        // 
        console.log(this.$store.state.pages)
    }
}
</script>